<!DOCTYPE html>
<html>
<head lang="en">
    <include file="appapi@head"/>
	<link type="text/css" rel="stylesheet" href="__STATIC__/appapi/css/family.css?t=1561712925"/>
	<style type="text/css">
		body{
			background: #FFF;
		}
	</style>
    <title>家族盈利</title>
</head>
<body class="profit">
	<div class="profit_bg">
        <notempty name="list">
		<div class="profit_ul_t">
			<span>主播</span>
			<span>时间</span>
			<span>家族盈利</span>
			<span>主播盈利</span>
		</div>
        </notempty>
		<div class="profit_ul clear">
			<ul>
				<volist name="list" id="v">
				<li>
					<span>{$v['userinfo']['user_nickname']}</span>
					<span>{$v['time']}</span>
					<span class="coin color_default"><img src="__STATIC__/appapi/images/coin.png">{$v['profitzong']}</span>
					<span class="coin color_default"><img src="__STATIC__/appapi/images/coin.png">{$v['anthor_totoal']}</span>
				</li>
				</volist>
                <empty name="list">
                    <div class="li_empty">
                        <p class="title"></p>
                        <p class="des">暂时还没有家族盈利</p>
                    </div>
                </empty>
			</ul>
		</div>
	</div>
	<script>
		var familyid='{$familyid}';
	</script>
	<include file="appapi@footer"/>
	<script>
	$(function(){
		function getlistmore(){
			$.ajax({
				url:'/appapi/Family/profit_more',
				data:{'page':page,'uid':uid,'token':token,'familyid':familyid},
				type:'post',
				dataType:'json',
				success:function(data){
					if(data.nums>0){
							var nums=data.nums;
							var list=data.data;
							var html='';
							for(var i=0;i<nums;i++){
								html+='<li>\
										<span>'+list[i]['userinfo']['user_nickname']+'</span>\
										<span>'+list[i]['time']+'</span>\
										<span class="coin color_default"><img src="__STATIC__/appapi/images/coin.png">'+list[i]['profitzong']+'</span>\
										<span class="coin color_default"><img src="__STATIC__/appapi/images/coin.png">'+list[i]['anthor_totoal']+'</span>\
									</li>';
							}
						
						$(".profit_ul ul").append(html);
					}
					
					if(data.isscroll==1){
						page++;
						isscroll=true;
					}
				}
			})
		}
		var page=2; 
		var isscroll=true; 

		$(".profit_ul").scroll(function(){  
				var srollPos = $(".profit_ul").scrollTop();    //滚动条距顶部距离(页面超出窗口的高度)  		
				var totalheight = parseFloat($(".profit_ul").height()) + parseFloat(srollPos);  
				if(($(document).height()-50) <= totalheight  && isscroll) {  
						isscroll=false;
						getlistmore()
				}  
		});  

	})
	</script>	
</body>
</html>